package org.gourpg.model.role;

/**
 * 角色与人员关系配置实体
 */
public class RolePersonRel {
    /**
     * 角色ID，角色的主键
     */
    private Integer roleId;

    /**
     * 用户id，用户的主键
     */
    private Integer personId;

    public RolePersonRel() {
    }

    public Integer getRoleId() {
        return this.roleId;
    }

    public Integer getPersonId() {
        return this.personId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public void setPersonId(Integer personId) {
        this.personId = personId;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof RolePersonRel)) return false;
        final RolePersonRel other = (RolePersonRel) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$roleId = this.getRoleId();
        final Object other$roleId = other.getRoleId();
        if (this$roleId == null ? other$roleId != null : !this$roleId.equals(other$roleId)) return false;
        final Object this$personId = this.getPersonId();
        final Object other$personId = other.getPersonId();
        if (this$personId == null ? other$personId != null : !this$personId.equals(other$personId)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RolePersonRel;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $roleId = this.getRoleId();
        result = result * PRIME + ($roleId == null ? 43 : $roleId.hashCode());
        final Object $personId = this.getPersonId();
        result = result * PRIME + ($personId == null ? 43 : $personId.hashCode());
        return result;
    }

    public String toString() {
        return "RolePersonRel(roleId=" + this.getRoleId() + ", personId=" + this.getPersonId() + ")";
    }
}
